import messages from './locale/index.js'
let i18nConfig = {
  locale: uni.getStorageSync('lang') || 'zh-Hans',// 获取已设置的语言
  messages
}

import App from './App'
import Vue from 'vue'
import VueI18n from 'vue-i18n'// v8.x
import './uni.promisify.adaptor'

Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)


Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  i18n,
  ...App
})
app.$mount()

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif